import request from '@/config/axios'

// ERP 一级库整合单 VO
export interface PriWarehouseIntegraVO {
  id: number // 编号
  integrateId: string // 整合单编号
  remark: string // 备注
  opinion: number // 审批意见
  status: number // 状态
  processInstanceId: string // 流程实例的编号
}

// ERP 一级库整合单 API
export const PriWarehouseIntegraApi = {
  // 查询ERP 一级库整合单分页
  getPriWarehouseIntegraPage: async (params: any) => {
    return await request.get({ url: `/erp/pri-warehouse-integra/page`, params })
  },

  // 查询ERP 一级库整合单详情
  getPriWarehouseIntegra: async (id: number) => {
    return await request.get({ url: `/erp/pri-warehouse-integra/get?id=` + id })
  },

  // 新增ERP 一级库整合单
  createPriWarehouseIntegra: async (data: PriWarehouseIntegraVO) => {
    return await request.post({ url: `/erp/pri-warehouse-integra/create`, data })
  },

  // 修改ERP 一级库整合单
  updatePriWarehouseIntegra: async (data: PriWarehouseIntegraVO) => {
    return await request.put({ url: `/erp/pri-warehouse-integra/update`, data })
  },

  // 删除ERP 一级库整合单
  deletePriWarehouseIntegra: async (id: number) => {
    return await request.delete({ url: `/erp/pri-warehouse-integra/delete?id=` + id })
  },

  // 导出ERP 一级库整合单 Excel
  exportPriWarehouseIntegra: async (params) => {
    return await request.download({ url: `/erp/pri-warehouse-integra/export-excel`, params })
  },
}
